<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>ailvo&nbsp;爱旅窝商城后台管理系统</title>
<include file="Public/header" />
<script charset="utf-8" src="__JS__/My97DatePicker/WdatePicker.js"></script>
<script type="text/javascript">
$(function(){
    $('#check').click(function(){
        var inputs = $(this).parents('.list_vmall_man').find('input');
        $(this).attr('checked') ? inputs.attr('checked','checked'):
           inputs.removeAttr('checked');
    });
    $("#delall").click(function(){
        var checkedNum = $("input[name='ids[]']:checked").length;
        if(checkedNum == 0) {
            alert("请至少选择一项！");
            return false;
        }
        if(confirm("确定要删除吗？")) {
            var checkedList = new Array();
            $("input[name='ids[]']:checked").each(function() {
                checkedList.push($(this).val());
            });
            window.location.href = '<{:U('delall')}>?ids='+checkedList;
        }
    });
})
</script>
</head>
<body>

        <div class="list_vmall_man">
        	<div class="list_vmall_le">
                <include file="./Apps/BoxAdmin/View/Public/adminMenu.html" />
            </div>
            <div class="list_vmall_rig">
            	<div class="list_vmall_bort">
                	<table width="100%" border="1" cellspacing="1" cellpadding="1">
                      <tr>
                        <form action="<{:U('index')}>" method="get">
                        <td height="46">
						<input type="text" name="kw" style="margin-left:5px;" value="<{$_REQUEST['kw']}>" />
						&nbsp;类型： <select name="cate_id" id="cate_id" style="margin-right:10px;">
								  <option value="">请选择</option>
								  <foreach name="catedata" key='k' item="v">
								  <option <if condition="$v['id'] eq $cate_id">selected="selected"</if>  value="<{$v['id']}>"><{$v.name}></option>
								  </foreach>
								  </select>
								  发布时间：<input type="text"  style="margin-left:5px;width:85px" onclick="WdatePicker()"  class="Wdate j-item-input j-ttem-b" name="begintime" value="<{$begintime}>"/>-<input type="text"  style="width:85px" onclick="WdatePicker()"  class="Wdate j-item-input j-ttem-b" name="endtime" value="<{$endtime}>"/>
						<input type="submit" value="搜索" style="margin-left:4px; height:26px; color:#333" class="btn" /></td>
                        </form>
                        <td height="46"><a href="<{:U('addContent')}>" class="v_mall_q"><i class="v_mall_fi"></i>添加资讯</a></td>
                      	
                      </tr>
                    </table>
					<table width="100%" class="v_am_bor_t v_am_td" border="1" cellspacing="1" cellpadding="1">
                      <tr class="v_am_bg_top" height="30">
                      <td width="50" align="center"><input type="checkbox" id="check" /></td>
                        <td height="34" align="center" valign="middle" class="v_am_font">ID</td>
                        <td height="34" align="center" valign="middle" class="v_am_font">标题</td>
                        <td height="34" align="center" valign="middle" class="v_am_font">所属分类</td>
                        <td height="34" align="center" valign="middle" class="v_am_font">作者</td>
                        <td height="34" align="center" valign="middle" class="v_am_font">来源</td>
                        <td height="34" align="center" valign="middle" class="v_am_font">添加时间</td>
                        <td height="34" align="center" valign="middle" class="v_am_font" style="border-right:0;">操作</td>
                      </tr>
                     <volist name="data" id="vo">
                      <tr>
                      <td align="center" valign="middle"><input type="checkbox" name="ids[]" value="<{$vo.id}>" /></td>
                        <td height="36" align="center" valign="middle"><{$vo.id}></td>
                        <td height="36" align="center" valign="middle"><{$vo.title}></td>
                         <td height="36" align="center" valign="middle"><{$vo.name}></td>
                        <td height="36" align="center" valign="middle"><{$vo.author}></td>
                        <td height="36" align="center" valign="middle"><{$vo.source}></td>
                        <td height="36" align="center" valign="middle"><{$vo.time|date='Y-d-d H:i', ###}></td>
                        <td style="border-right:0;"  height="36" align="center" valign="middle">
						<a href="http://<{$_GET['storeDomain']}>.__Domain__/Content/details/id/<{$vo.id}>" class="btn" target="_blank"> 查看</a>
                            <a  href="<{:U('addContent',array('id'=> $vo['id']))}>" class="btn"><i class="v_mall_tubg v_mall_tj2"></i>&nbsp;编辑</a>
                            <a  href="<{:U('delete',array('id'=> $vo['id']))}>" onclick="return confirm('确认需要删除些信息吗？');" class="btn"><i class="v_mall_tubg v_mall_tj3"></i>&nbsp;删除</a>
                           
                        </td>
                      </tr>
                      </volist>  
                    
                    </table>
					      <a class="btn" id="delall">批量删除</a>
                   <include file="./Apps/BoxAdmin/View/Ace/Public/pager.html" />
                </div>
            </div>
       
        
    </div>
 
</body>
</html>
